public class change {
    public static void main(String[] arry)
    {
        int a,b;
        int [] arr={1,2,3,4,5} ;
        a=arr[0];
        b=arr[1];
        System.out.println("a="+a+",b="+b);
        change1(a,b);
        //System.out.println("");
        change2(arr);
        for(int i=0;i<arr.length;i++)
        {
            System.out.println(arr[i]);
        }
    }


    public static void change1(int a,int b)
    {
        System.out.println("a="+a+",b="+b);
        a=b;
        b=a+b;
        System.out.println("a="+a+",b="+b);
    }
    public static void change2(int [] arr)
    {
        for(int i=0;i<arr.length;i++) {
            if (arr[i] % 2 == 0)
                arr[i] *= 2;
        }
    }

}
